<template>
  <div class='container'>
    <h2>{{previewData.title}}</h2>
    <span style="margin-right:10px">{{previewData.createTime | parseTimeByString}}</span>

    <span><i
        class="el-icon-view"
        style="margin-right:5px"
      ></i>{{previewData.visits}}</span>

    <div
      v-html="previewData.articleBody"
      class="box"
    ></div>
  </div>
</template>

<script>
export default {
  props: {
    previewData: {
      type: Object,
      required: true
    }
  },
  created () {
    console.log(this.previewData)
  }
}
</script>

<style scoped>
.box {
  overflow: auto;
}
h2 {
  margin-top: 0;
}
</style>
